<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <ul>
        <!--v-for="遍历项 in 数组" 循环遍历指令,遍历的同时生成元素对象-->
        <li v-for="name in arr">{{name}}</li>
    </ul>
    <table border="1">
        <caption>产品列表</caption>
        <tr>
            <th>名称</th><th>价格</th><th>销售数量</th>
        </tr>
        <tr v-for="p in productArr">
            <td>{{p.title}}</td>
            <td>{{p.price}}</td>
            <td>{{p.saleCount}}</td>
        </tr>

    </table>
</div>
<script src="vueScript/vue.min.js"></script>
<script>
    let v=new Vue({
        el:"body>div",
        data:{
            info:"hello Vue!!!!!",
            arr:["刘备","关羽","张飞"],

            persons:[{name:"张三",age:18,salary:3000},
                {name:"李四",age:"28",salary:4000},
                {name:"王五",age:"30",salary:5000}],

            productArr:[{title:"双飞燕鼠标",price:20,saleCount:100},
                {title:'逻辑键盘',price:80,saleCount:200},
                {title:'联想电脑',price: 5320,saleCount:500}]

        },
        methods:{

        }
    })
</script>
</body>
</html>